package com.health.work.activity;

import com.health.work.R;
import com.health.work.other.TopViewEvent;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;


/**
 * @author Zhai
 * 注册  医护人员
 */
public class RegisteHealtherActivity extends Activity implements
		OnClickListener {

	private LinearLayout type1;// 执业医师
	private LinearLayout type2;// 专业医师
	private LinearLayout type3;// 乡村医师
	private LinearLayout type4;// 爱心医师
	private TextView back;

	@Override
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.registerhealthworker);
		init();
	}

	private void init() {
		type1 = (LinearLayout) this.findViewById(R.id.type1);
		type2 = (LinearLayout) this.findViewById(R.id.type2);
		type3 = (LinearLayout) this.findViewById(R.id.type3);
		type4 = (LinearLayout) this.findViewById(R.id.type4);
		back=(TextView)this.findViewById(R.id.back);
		type1.setOnClickListener(this);
		type2.setOnClickListener(this);
		type3.setOnClickListener(this);
		type4.setOnClickListener(this);
		back.setOnClickListener(this);

	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		return super.onKeyDown(keyCode, event);
	}

	@Override
	protected void onPause() {
		super.onPause();
	}

	@Override
	protected void onRestart() {
		super.onRestart();
	}

	@Override
	protected void onResume() {
		super.onResume();
	}

	@Override
	protected void onStart() {
		super.onStart();
	}

	@Override
	protected void onStop() {
		super.onStop();
	}

	@Override
	public void onClick(View v) {
		Intent i;
		switch (v.getId()) {
		case R.id.back:
			finish();
			break;
		case R.id.type1:
			goToInputContent(1);
			break;
		case R.id.type2:
			goToInputContent(2);
			break;
		case R.id.type3:
			goToInputContent(3);
			break;
		case R.id.type4:
			goToInputContent(4);
			break;
		default:
			break;
		}
	}

	private void goToInputContent(int kind) {
		Intent i = new Intent(this, RegisteDocInfoInputActivity.class);
		startActivity(i);
	}
}
